package MyGame;

import edu.chalmers.AV_2DPlatformerFramework.Game;
import edu.chalmers.AV_2DPlatformerFramework.Model.Hitbox;
import edu.chalmers.AV_2DPlatformerFramework.View.Camera;

/**
 * The main class for our prototype, which extends functionality from Game
 * @version 1.0
 * @author Andrea Buchholz
 */

public class MyGame extends Game{

     /**
     * 
     * @param width
     * @param height
     * @param title
     */
    public MyGame(int width, int height, String title) {
        super(width, height, title);
   }
  
    public MyGame(){
       super(1080, 720, "The Adventures of Edmund!");
    }
    
    public static void main(String[] args){
        MyGameView view = new MyGameView();
        try {
            Camera c = new Camera();
            view.camera = c;
            MyGame game = new MyGame();
            MyGameModel model = new MyGameModel(game, c);
            game.setCModel(model);
            game.add(view);
            view.setModel(model);
            view.setVisible(true);
            game.setVisible(true);
        } 
        catch (Hitbox.HitboxMalformedException ex) {
            System.out.println("Bad hitbox in:" + ex.toString());
        }     
    }
}